package com.liumuxian.video.dao;

import com.liumuxian.video.pojo.Video;
import org.springframework.data.jpa.repository.*;
import java.util.*;

public interface VideoDao extends JpaRepository<Video,String>, JpaSpecificationExecutor<Video> {
    @Modifying
    @Query(value = "update tb_video set type=?1,price=?2,count=?3,state=?4,creatdata=?5,updatedate=?6 where id=?7",nativeQuery = true)
    void update(Integer type,Double price,Double count,Integer state,Date creatdata, Date updatedate,String vid);
    List<Video> findAllByIdInAndState(Set<String> id, Integer state);
    List<Video> findAllByState(Integer state);
}
